package com.starlink.model.dtomapper;

import com.starlink.model.domain.PermissionDO;
import com.starlink.model.request.PermissionRequest;
import com.starlink.model.vo.PermissionVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface PermissionDtoMapper {

    PermissionDtoMapper INSTANCE = Mappers.getMapper(PermissionDtoMapper.class);

    /**
    * DO to VO
    * @param permissionDO
    * @return
    */
    PermissionVO do2VO(PermissionDO permissionDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    PermissionDO request2DO(PermissionRequest request);
}
